package com.wutao.panzh.admin.mapper;

import com.panzh.entity.SceneryItem;
import com.panzh.entity.index.IndexSceneryItem;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SceneryItemMapper extends Mapper<SceneryItem> {

    List<SceneryItem> selectFroSearch(@Param("keyWord") String keyWord);

    void insertSceneryItem(SceneryItem sceneryItem);

    SceneryItem selectSceneryItemById(@Param("id")String sceneryId);

    void deleteSceneryById(@Param("id")Integer id);

    List<SceneryItem> selectSceneryItemByItemName(@Param("itemName") String itemName);

    void updateSceneryItem(SceneryItem sceneryItem);

    String selectImagSrcBySceneryItemId(@Param("sceneryItemId") String sceneryItemId);

    void insertImagSrcBySceneryItemId(@Param("imagSrc")String imagSrc,@Param("sceneryItemId") String sceneryItemId);

    void updateImagSrcBySceneryItemId(@Param("imagSrc")String imagSrc,@Param("sceneryItemId") String sceneryItemId);

    void deleteSceneryImage(@Param("sceneryId")String sceneryId);

    /**
     * 这下面就是前端index的操作了！！
     * @return 返回IndexSceneryItem的集合对象；
     */
    List<IndexSceneryItem> selectIndexSceneryFroSearch(@Param("classificationId")Integer classificationId);
}